<ion-view view-title="欢迎来到全民康">
  	    <!--<header class="bar bar-header bar-stable">
            <div class="show" ng-click="toggleLeft()" style="width: 9%;padding: 8px 0 0 10px;">
				<img src="img\icons\menu_white.svg"/>
			</div>
			<h1 side="left" class="title Whitefont-17">欢迎来到全民康</h1>
		</header>-->
   	<header class="bar bar-header bar-stable" ng-class="{true:'ios_bar',false:''}[Is_Ios]">
        <div class="show" ng-click="toggleLeft()" style="width: 9%;padding: 8px 0 0 10px;" ng-class="{true:'ios_show',false:''}[Is_Ios]"> <!--side="left" -->
             <img src="img\icons\menu_white.svg"/>
        </div>
        <h1 side="left"  class="title Whitefont-17" ng-class="{true:'ios_show',false:''}[Is_Ios]">欢迎来到全民康</h1>
    </header>
  <ion-content class="home">

      <!--未连接设备-->
    <div class="no_device" ng-if="userMes && !connected">
		<img src="img/hh.jpg" width="280" height="130"/>
		<p class="Whitefont-15 nomargin noline marginTop-13 marginBottom-10">我的健康 我做主</p>
		<p class="Whitebg Bluefont-15 lineHeight-40" ng-click="linkdev()">连接设备<img src="img\icons\arrowwhite.svg" alt="">&nbsp;&nbsp;&nbsp;</p>
	</div>
    <div class="go_shop" ng-if="userMes && !connected">
        <p class="Grayfont-14 lineHeight-40">点击前往<span class="Greenfont-14" ng-click="openBow()">{{shopName}}</span>购买<img src="img\icons\arrow.svg" alt=""></p>
    </div>
    <!--未登录-->
	<div class="home-top" ng-if="!userMes">
		<img src="img/icons/logo.svg" width="80"/>
		<p class="Whitefont-14 nomargin lineHeight-20 marginTop-20">加入健康保养俱乐部，成为会员，累计越多康豆，</p>
		<p class="Whitefont-14 nomargin lineHeight-20">获赠更多好礼！</p>
	</div>
	<div class="Whitebg home_btn" ng-if="!userMes">
		<p class="Whitebg floatLeft marginBottom-20 Bluefont-15 lineHeight-40 marginLeft-40 btn_left" ui-sref="app.register">注册</p>
		<p class="Bluebg floatRight marginBottom-20 Whitefont-15 lineHeight-40 marginRight-40 btn_right" ui-sref="app.login">登录</p>
	</div>
    <!--设备已连接-->
    <div class="is_device"  ng-if="userMes && connected">
        <div style="clear: both;height: 5px;"></div>
        <div class="Greenbg"></div>
        <div class="use_device">
            <div>
                <p class="Greenfont-18">{{userMes.signed || 0}}次</p>
                <p class="Grayfont-13 nomargin"><img src="img\icons\qiandao.svg" alt="">累计签到</p>
            </div>
            <div>
                <p class="Greenfont-18">{{userMes.cumutativetime / 60 | number:1}}分钟</p>
                <p class="Grayfont-13 nomargin"><img src="img\icons\time1.svg" alt="">保养时长</p>
            </div>
            <div>
                <p class="Greenfont-18">{{timeLong}}</p>
                <p class="Grayfont-13 nomargin"><img src="img\icons\nengliang.svg" alt="">能量值</p>
            </div>
        </div>
        <div class="device_stat">
            <p class="Defaultfont-14 floatLeft lineHeight-40 nomargin">{{device_name || ''}}保养统计</p>
            <p class="Bluefont-14 floatRight  lineHeight-40 nomargin">累计{{useDevTime | number:1}}分钟</p>
        </div>
        <div class="device_usering">
            <p class="Grayfont-13 marginTop-20">{{device_name || ''}}使用情况</p>
            <ion-slide-box active-slide="myActiveSlide"  on-slide-changed="slideHasChanged(index)">
                <ion-slide>
                    <div id="main11" style="width: 100%; height:200px;"></div>
                </ion-slide>
                <ion-slide>
                    <div id="main12" style="width: 100%; height:200px;"></div>
                </ion-slide>
            </ion-slide-box>
        </div>
    </div>
    <div style="clear: both;height: 10px;background: #f7f8fa;" ng-if="userMes"></div>
    <div class="lineHeight-40 home_cen" ui-sref="app.redList" ng-if="userMes">
		<p class="Defaultfont-15 floatLeft nomargin">红包活动</p>
		<div class="floatRight"><img class="floatRight marginTop-12 marginLeft-10" src="img/icons/icon_more.svg" alt="" width="10"/><p class="Redfont-13 floatRight">更多红包等你来抢</p><img class="floatRight marginTop-12 marginRight-5" src="img/loginicons/icon_hongbao.svg" alt="" width="15"/></div>
    </div>
    <div class="bom_img marginRight-10 marginLeft-10 height marginTop-10" ng-if="userMes" ng-repeat="red in redHoveData" ui-sref="app.red({id:red.id})">
        <!--<img ng-src="{{red.mainpic ? red.mainpic : 'img/icons/defaule_picture.png'}}" width="100%" height="150"/>-->
        <div class="noborder nomargin nopadding marginBottom-10" ng-style="RedBG" style="height:150px;background: url(img/icons/defaule_picture.png) no-repeat 50% 50%;background-size: cover;"></div>
    </div>
    <div style="clear: both;height: 10px;background: #f7f8fa;"></div>
	<div class="lineHeight-40 home_cen" ui-sref="app.message">
		<p class="Defaultfont-15 floatLeft nomargin">全部资讯</p>
		<div class="floatRight"><img src="img/icons/icon_more.svg" alt="" width="10"/></div>
	</div>
    <div style="clear: both;"></div>
	<div class="Whitebg home_bom" ng-if="newListData">
		<div class="bom_img listBorder marginRight-10 marginLeft-10 height" ui-sref="app.message_data({'id':newListData[0].id})">
				<!--<img ng-src="{{newListData[0].imgs[0] ? newListData[0].imgs[0] : 'img/icons/defaule_picture.png'}}" width="100%" height="150"/>-->
                <div class="noborder marginTop-10 noborder" ng-style="BG" style="height:150px;background: url(img/icons/defaule_picture.png) no-repeat 50% 50%;background-size: cover;"></div>
				<p class="Whitefont-15 nomargin lineHeight-30" style="text-overflow:ellipsis;white-space: nowrap;overflow: hidden;">{{newListData[0].title}}</p>
		</div>
        <div style="clear: both;"></div>
		<div class="bom_p listBorder marginLeft-10 marginRight-10" ui-sref="app.message_data({'id':newListData[1].id})">
			<p class="p_title Defaultfont-15 noline floatLeft" style="width: 95%;text-overflow:ellipsis;white-space: nowrap;overflow: hidden;">{{newListData[1].title}}</p>
			<div class="floatRight"><img src="img/icons/icon_more.svg" width="10"/></div>
			<p class="p_mas Grayfont-13 noline floatLeft" style="width: 95%;text-overflow:ellipsis;white-space: nowrap;overflow: hidden;">{{newListData[1].summary}}</p>
		</div>
		<div class="bom_p listBorder marginLeft-10 marginRight-10" ui-sref="app.message_data({'id':newListData[2].id})">
			<p class="p_title Defaultfont-15 noline floatLeft" style="width: 95%;text-overflow:ellipsis;white-space: nowrap;overflow: hidden;">{{newListData[2].title}}</p>
			<div class="floatRight"><img src="img/icons/icon_more.svg" width="10"/></div>
			<p class="p_mas Grayfont-13 noline floatLeft" style="width: 95%;text-overflow:ellipsis;white-space: nowrap;overflow: hidden;">{{newListData[2].summary}}</p>
		</div>
	</div>
  </ion-content>
      <!--签到-->
    <div class="sign_in Redbg" ng-if="signlog_data == 'Not_sign_up' && userMes" ng-click="goSign()">
          <img src="img\icons\nengliangwhite.svg" alt="" width="20" height="20">
          <p class="Whitefont-14 nomargin noline">上午签到</p>
    </div>
    <div class="sign_in Redbg" ng-if="signlog_data == 'Am_sign' && userMes">
          <img src="img\icons\nengliangwhite.svg" alt="" width="20" height="20">
          <p class="Whitefont-14 nomargin noline">上午已签</p>
    </div>
    <div class="sign_in Redbg" ng-if="signlog_data == 'Not_sign_down' && userMes" ng-click="goSign()">
          <img src="img\icons\nengliangwhite.svg" alt="" width="20" height="20">
          <p class="Whitefont-14 nomargin noline">下午签到</p>
    </div>
    <div class="sign_in Redbg" ng-if="signlog_data == 'Sign_in' && userMes">
          <img src="img\icons\nengliangwhite.svg" alt="" width="20" height="20">
          <p class="Whitefont-14 nomargin noline">下午已签</p>
    </div>
    <div ng-show="slideOpen" style="position: fixed; background-color: #000000; width: 100%; height: 100%; opacity: 0.3;z-index: 10"></div>
</ion-view>


